Cset exclude: cl349@freefall.cl.cam.ac.uk|ChangeSet|
20040916093252|64395
tx->size = skb->len;
wmb(); /* Ensure that backend will see the request. */
- i++;
- np->tx->req_prod = i;
+ np->tx->req_prod = i + 1;
network_tx_buf_gc(dev);
- if ( (i - np->tx_resp_cons) == NETIF_TX_RING_SIZE )
+ if ( (i - np->tx_resp_cons) == (NETIF_TX_RING_SIZE - 1) )
{
np->tx_full = 1;
netif_stop_queue(dev);
/* Only notify Xen if there are no outstanding responses. */
mb();
- if ( np->tx->resp_prod != i )
+ if ( np->tx->resp_prod == i )
notify_via_evtchn(np->evtchn);
return 0;